package com.catazy.module_square.repository

import com.catazy.module_square.bean.ArticleData
import com.catazy.module_square.net.HttpSquareService
import com.catazy.wanandroid.common_base.bean.HttpResult
import dagger.hilt.android.scopes.ActivityRetainedScoped
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn
import javax.inject.Inject

/**
 * 作者: Tao
 * 日期: 2024/5/6
 * 时间: 11:07
 * 描述: 广场远程数据仓库
 */
@ActivityRetainedScoped
class SquareRemoteRepository @Inject constructor() {


    fun getSquareList(pageNum: Int): Flow<HttpResult<ArticleData>> {
        return HttpSquareService.service.getSquareList(pageNum)
    }
}